package com.scau.dao;

import com.scau.entity.Student;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface StudentDao extends JpaRepository<Student, Long> {
    Page<Student> findByRemainingClassGreaterThan(Integer remainingClass, Pageable pageable);

    Page<Student> findByRemainingClassLessThanEqual(Integer remainingClass, Pageable pageable);

    Page<Student> findByRemainingClassGreaterThanAndAge(Integer remainingClass, Integer age, Pageable pageable);

    Page<Student> findByRemainingClassGreaterThanAndName(Integer remainingClass, String name, Pageable pageable);

    Page<Student> findByRemainingClassGreaterThanAndFollower(int remainingClass, String follower, Pageable pageable);

    Page<Student> findByRemainingClassLessThanEqualAndAge(int remainingClass, Integer age, Pageable pageable);

    Page<Student> findByRemainingClassLessThanEqualAndName(int remainingClass, String name, Pageable pageable);

    Page<Student> findByRemainingClassLessThanEqualAndFollower(int remainingClass, String follower, Pageable pageable);
}
